# -*- encoding:utf-8 -*-
# @time: 2023/3/15 19:12
# @author: Maxs_hu
import os
import sys
import django
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Order.settings')
django.setup()  # 伪造让django启动


from web import models
from utils.encrypt import md5

# 创建level
# models.Level.objects.create(
#     title="SVIP",
#     percent=80
# )

for item in range(111, 402):
    # 创建user
    models.Customer.objects.create(
        username='xiaoergu-{}'.format(item),
        password=md5('woshixiaoergu'),
        mobile='17756692923',
        level_id=1,
        creator_id=1
    )
